package com.frank.loadinglibrary.base.baseelement;

import ohos.agp.render.Canvas;

/**
 * @author eric_shaw
 * @version 1.0
 * @description 组件元素通用接口
 * @classname IViewElement.class
 * @program loadinglibrary
 * @date 2021/06/09
 **/
public interface IViewElement {
    /**
     * 初始化画笔
     */
    public void initPaint();

    /**
     * 绘制
     *
     * @param canvas 画布
     */
    public void draw(Canvas canvas);

    /**
     * 测量 初始化宽高
     *
     * @param width
     * @param height
     */
    public void onMeasure(float width, float height);

    /**
     * 释放
     */
    public void release();
}
